#include <iostream>
#include <cmath>
using namespace std;

//https://www.nowcoder.com/practice/41b42e7b3c3547e3acf8e90c41d98270?tpId=290&tqId=39852&ru=/exam/oj

int main()
{
    int sum = 20;
    float weight;
    char ch;
    cin >> weight >> ch;

    weight--;
    if (weight > 0)
        sum += ceil(weight);

    cout << (ch == 'y' ? sum + 5 : sum) << endl;
    return 0;
}
